#!/bin/bash

bash scripts/build.sh

date

echo "---------------------------------------------------------------------------------------------------------------------------------------------------------"
echo "Starting Exchange..."
echo "---------------------------------------------------------------------------------------------------------------------------------------------------------"
./cmake-build-release/exchange_main 2>&1 &
sleep 10

bash ./scripts/run_clients.sh

sleep 5

echo "---------------------------------------------------------------------------------------------------------------------------------------------------------"
echo "Stopping Exchange..."
echo "---------------------------------------------------------------------------------------------------------------------------------------------------------"
pkill -2 exchange

sleep 10

wait
date
